<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    String date = format.format(new Date());
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/carListPage.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/CoachListPage.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/argeeCommon.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/againstAuditCommon.jsp" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css">
</head>
<style>
    li span {
        margin-left: 0px;
        cursor: pointer;
    }

    li span:hover {
        color: #427dff
    }

    .botton input {
        width: 230px;
    }

    /**按钮样式**/
    .subtn1 {
        background: #57a0ff;
        border-radius: 50px;
        background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
        background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
        background: linear-gradient(top, #57a0ff, #57a1ff);
        background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
        border: 1px solid #2576A8;
        box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
        color: #fff;
        height: 40px;
        text-shadow: 1px 1px 0.5px #22629B;
        outline: none;
    }

    .btn {
        background: #57a0ff, background;
        border-radius: 50px;
        background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
        background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
        background: linear-gradient(top, #57a0ff, #57a1ff);
        background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
        border: 1px solid #2576A8;
        box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
        color: #fff;
        height: 40px;
        text-shadow: 1px 1px 0.5px #22629B;
        outline: none;
    }

    .subtn1:hover {
        background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
        background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
        background: linear-gradient(top, #8DC9EF, #4E9FD1);
        background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
    }

    .btn:hover {
        background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
        background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
        background: linear-gradient(top, #8DC9EF, #4E9FD1);
        background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
    }

    .modal-data {
        visibility: hidden;
        z-index: 1001;
        width: 1000px;
        min-height: 500px;
        margin: 100px auto;
        background-color: #FFFFFF;
        /* border: 1px solid #C80B14;*/
        -moz-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
        -webkit-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
        /*         box-shadow:0 0 10px #cccccc;
                box-shadow: #cccccc; */
        box-shadow: 0 10px 20px #57a1ff inset, 0 -10px 0 #57a0ff inset;
        padding: 5px;
        text-align: center;
        position: fixed;
        left: 22%;
    }

    .modal-data1 td {
        padding-left: 15px;
        padding-right: 15px
    }

    .modal-data1 tr:FIRST-CHILD td {
        padding: 0px 10px;
    }

    .modal-data1 tr {
        padding-top: 30px
    }

    .modal-data1 form table {
        margin: 0px
    }

    input[type=checkbox] {
        padding: 0px;
        margin: 0px;
        text-align: right;
        width: 15px
    }

    .div_zilei {
        width: 600px;
        padding-left: 90px;
        height: 30px
    }

    .tr {
        height: 40px;
        background:#57a0ff;
        font-weight:700;
    }

    .tr td {
        font-size: 14px;
        color: #ffffff
    }

    .tr_td {
        height: 40px;
    }

    .tr_td td {
        border-bottom: 1px solid #ededed;
        text-align: center;
    }

    tr td:nth-child(1) {
        font-size: 14px;
        color: #cccccc
    }

    .date {
        border: 0;
        background: #ffffff;
        text-align: center;
    }

    .tr_td td:nth-child(1) {
        border-left: 1px solid #cccccc;
    }

    .addTable.deleteTable:HOVER {
        cursor: pointer;
    }

    .fseq {
        width: 37px;
        border: 0;
        text-align: center;
        color: #cccccc
    }

    .jczl {
        padding-left: 100px;
    }

    .div_tj {
        margin-top: 40px;
        padding-right: 60px;
    }

    .text {
        border: 0;
        background: #ffffff;
        text-align: center;
    }

    .remuneration1 {
        width: 150px;
        border: 0;
        background: #ffffff;
        text-align: center;
    }

    .loading {
        margin: 100px 450px;
        display: block;
        width: 65px;
        height: 65px;
        border: 1px solid #ddd;
        border-radius: 5px;
        opacity: .7;
        background: url(../images/loading.gif) no-repeat;
    }

    .botton {
        float: left;
        margin-left: 80px;

    }

    .botton span {
        width: 80px;
    }

    span input {
        width: 120px;
    }

    .findBtn1 {
        margin-left: 50px;
    }

    select {
        width: 234px;
        height: 31px
    }

    .tr td {
        font-size: 14px;
        color: #ffffff
    }

    .tr_td {
        height: 40px;
    }

    .tr_td td {
        border-bottom: 1px solid #ededed;
        text-align: center;
    }

    tr td:nth-child(1) {
        font-size: 14px;
        color: #cccccc
    }

    .date {
        border: 0;
        background: #ffffff;
        text-align: center;
    }

    .tr_td td:nth-child(1) {
        border-left: 1px solid #cccccc;
    }

    .tr_td td:nth-child(3) {
        border-right: 1px solid #cccccc;
    }

    .addTable.deleteTable:HOVER {
        cursor: pointer;
    }

    type[type='checkbox'] {
        width: 15px;
    }

    .div_zilei {
        padding-left: 90px;
        height: 30px
    }
    .div_input_hang {
        width: 100%;
        height: 40px;
    }
    .input_hang {
        float: left;
        width: 500px;
        height: 40px;
    }

</style>
<body style="background: #f5f5f5">

<div class="main">
    <div id="modal-overlay">

    </div>

    <div class="weizhi">
        <c:if test="${flag eq 1 }">
            教练管理>>教练换科目>>新增
        </c:if>
        <c:if test="${coachsub.cfbillstate == 3}">
            教练管理>>教练换科目>>修改
        </c:if>
        <c:if test="${coachsub.cfbillstate == 4}">
            教练管理>>教练换科目>>查看
        </c:if>
        <c:if test="${coachsub.cfbillstate == 5}">
            教练管理>>教练换科目>>查看
        </c:if>
    </div>
    <div class="div_body" style="min-height: 900px;">
        <%--提示的隐藏标识--%>
        <input type="hidden" id="alertType" value="${alertType}">

        <c:if test="${flag eq 1 }">
            <div class="div_form">
                <form action="<%=path%>/DrivingSys/add_Coachsub" onsubmit="StopRepeat()" id="update_shar" class="form"
                      method="get">
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                            <input type="text" name="name" value="${department}" readonly="readonly"
                                   style="color: gray;"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                            <input type="text" name="fnumber" value="${fnumber}" style="color: gray;"
                                   readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                            <input type="text" name="fbizdate" id="fbizdate_bind" value="${time}"
                                   onclick="WdatePicker({el:'fbizdate_bind',dateFmt:'yyyy-MM-dd'})"/>
                            <img onclick="WdatePicker({el:'fbizdate_bind',dateFmt:'yyyy-MM-dd'})"
                                 src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                        </div>
                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                            <input name="fdescription"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                            <select name="cfbillstate">
                                <option style="color: gray;" value="3">保存</option>
                            </select>
                        </div>

                    </div>
                    <div style="width: 20%; margin-left: 90px; float: left">教练</div>
                    <div class="div_zilei" style="margin-left: 90px; float: left">
                        <div style="width: 38%;text-align: right;">
                            <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                            <span style="padding-right: 20px;color:#57a0ff;font-weight:700;font-size: 14px" class="addTable">添加</span>
                            <img src="<%=path%>/image/delete212.png" class="deleteTable">
                            <span class="deleteTable" style="color:#57a0ff;font-weight:700;font-size: 14px"
                                  class="deleteTable">删除</span>
                        </div>
                    </div>
                    <div style="overflow:auto;min-height: 390px;max-height: 390px;width: 88%;margin-left: 90px;">
                        <table id="tablejl" width="50%" style=" min-height:50px;border-spacing:0;white-space:nowrap;">
                            <tr class="tr">
                                <td width="20px" align="center" style="padding-left: 5px"><%--<input type="checkbox"
                                                                                                 name="check"
                                                                                                 class="check"
                                                                                                 style="width: 15px;">--%>
                                </td>
                                <td width="30px">序号</td>
                                <td align="center">教练</td>
                                <td align="center">教练编码</td>
                                <td align="center">原教学科目</td>
                                <td align="center">原来车型</td>
                                <td align="center">现教学科目</td>
                                <td align="center">现在车型</td>
                                <td align="center">备注</td>
                            </tr>
                            <tr>
                                <td width='20px' align='center'>
                                    <input class='check2' type="checkbox" name="check2" style="width:15px">

                                </td>
                                <td><input type="text" class="fseq" name="fseq" value="1" readonly="readonly"></td>
                                <td align='center'><input onclick="clickJlname($(this))" class='jlName is_click'
                                                          style='width: 90px;'
                                                          type='text' name='jlName' value=''/>
                                    <input type="hidden" name="cfcoachid" class="cfcoachid">
                                </td>
                                <td align='center'><input class='cfcoachno' style='width: 90px;' readonly="readonly"
                                                          type='text' name='cfcoachno' value=''/>
                                </td>
                                <td name='notcheck' align='center'>
                                    <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                           type='text' name='cfdqsub1' value=''/>
                                    <input class='cfdqsub' style='width: 90px;'
                                           type='hidden' name='cfdqsub' value=''/>

                                </td>
                                <td align='center'><input class='cfdqcartype' style='width: 90px;' readonly="readonly"
                                                          type='text' name='cfdqcartype' value=''/>
                                </td>
                                <td name='notcheck' align='center'>
                                    <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                        <option value="1">科目一</option>
                                        <option value="2">科目二</option>
                                        <option value="3">科目三</option>
                                    </select>
                                </td>
                                <td name='notcheck' align='center'>
                                    <select style='width: 90px;' name="cfxzcartype" class="cfxzcartype">
                                        <option value="A1" style="font-size: 16px">A1</option>
                                        <option value="A2" style="font-size: 16px">A2</option>
                                        <option value="A3" style="font-size: 16px">A3</option>
                                        <option value="B1" style="font-size: 16px">B1</option>
                                        <option value="B2" style="font-size: 16px">B2</option>
                                        <option value="C1" style="font-size: 16px">C1</option>
                                        <option value="C2" style="font-size: 16px">C2</option>
                                        <option value="C3" style="font-size: 16px">C3</option>
                                        <option value="C4" style="font-size: 16px">C4</option>
                                        <option value="D" style="font-size: 16px">D</option>
                                        <option value="E" style="font-size: 16px">E</option>
                                        <option value="F" style="font-size: 16px">F</option>
                                        <option value="M" style="font-size: 16px">M</option>
                                        <option value="N" style="font-size: 16px">N</option>
                                        <option value="P" style="font-size: 16px">P</option>
                                    </select>
                                </td>
                                <td name='notcheck' align='center'><input class='cfdesc' style='width: 90px;'
                                                                          type='text' name='cfdesc' value=''/>
                                </td>
                            </tr>
                        </table>
                    </div>

                    <div style="line-height:31px; margin-top: 80px; height: 31px; width: 80%">
                        <div class="botton">
                            <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                            <input id="shename" type="text" name="ffivouchered" disabled="disabled"
                                   value="">
                        </div>
                        <div class="botton">
                            <span class="gn_name">创建人&nbsp;:&nbsp;</span>
                            <input id="createname" type="text" name="createName" disabled="disabled"
                                   value="${createName}">
                        </div>
                        <div class="botton">
                            <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                            <input id="updatetime" type="text"
                                   name="fcreatetime" disabled="disabled"
                                   value="${recordin.fcreatetime}">
                        </div>
                    </div>

                    <div class="div_tj" style="margin-bottom: 200px;margin-left: 140px">
                        <div>
                            <input onclick="chcek()" type="button" class="input_submit bc" value="" style="margin-top: 0px;margin-right: 30px;"/>
                        </div>
                        <div>
                            <input type="button" class="input_back fh" value="" onclick="back()" style="margin-top: 0px;"/>
                        </div>
                    </div>
                </form>
            </div>

        </c:if>


        <!-- 修改页面-->


        <c:if test="${flag eq 2 }">
            <c:if test="${coachsub.cfbillstate == 3}">

                <div class="div_form">
                    <form id="update_shar" action="<%=path%>/DrivingSys/update_CoachSub" onsubmit="StopRepeat()"
                          class="form" method="get">
                        <div class="div_input_hang">
                            <input type="hidden" name="fid" id="fid" value="${coachsub.fid}"/>
                            <div class="input_hang">
                                <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                                <input type="text" name="name" value="${department}" readonly="readonly"
                                       style="color: gray;"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                                <input type="text" name="fnumber" id="fnumber" value="${coachsub.fnumber}"
                                       style="color: gray;"
                                       readonly="readonly"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                                <input type="text" name="fbizdate" id="fbizdate_bind" value="${coachsub.fbizdate}"
                                       onclick="WdatePicker({el:'fbizdate_bind',dateFmt:'yyyy-MM-dd'})"/>
                                <img onclick="WdatePicker({el:'fbizdate_bind',dateFmt:'yyyy-MM-dd'})"
                                     src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                            </div>
                        </div>
                        <div class="div_input_hang">
                            <div class="input_hang">
                                <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                                <input name="fdescription" value="${coachsub.fdescription}"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                                <select name="cfbillstate">
                                    <option id="fdescriptionL2" style="color: gray;" value="3">保存</option>
                                </select>
                            </div>
                        </div>
                        <div style="width: 100%; margin-left: 90px; float: left">教练</div>
                        <div class="div_zilei" style="margin-left: 90px; float: left">
                            <div style="width: 38%;text-align: right;">
                                <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                                <span style="padding-right: 20px;color:#57a0ff;font-weight:700;font-size: 14px"
                                      class="addTable">添加</span>
                                <img src="<%=path%>/image/delete212.png" class="deleteTable">
                                <span class="deleteTable" style="color:#57a0ff;font-weight:700;font-size: 14px"
                                      class="deleteTable">删除</span>
                            </div>
                        </div>
                        <div style="overflow:auto;min-height: 390px;max-height: 390px;width: 88%;margin-left: 90px;">
                            <table id="tablejl" width="50%"
                                   style=" min-height:50px;border-spacing:0;white-space:nowrap;">
                                <tr class="tr">
                                    <td width="20px" align="center" style="padding-left: 5px"><%--<input type="checkbox"
                                                                                                     name="check"
                                                                                                     class="check"
                                                                                                     style="width: 15px;">--%>
                                    </td>
                                    <td width="30px">序号</td>
                                    <td align="center">教练</td>
                                    <td align="center">教练编码</td>
                                    <td align="center">原教学科目</td>
                                    <td align="center">原来车型</td>
                                    <td align="center">现教学科目</td>
                                    <td align="center">现在车型</td>
                                    <td align="center">备注</td>
                                </tr>
                                <c:forEach items="${coachsub.coachsubentryList}" var="coachsubentry" varStatus="s">
                                    <tr>
                                        <td width='20px' align='center'>
                                            <input class='check2' type="checkbox" name="check2" style="width:15px">

                                        </td>
                                        <td><input type="text" class="fseq" name="fseq" value="${s.index+1}"
                                                   readonly="readonly"></td>
                                        <td align='center'><input onclick="clickJlname($(this))" class='jlName is_click'
                                                                  style='width: 90px;'
                                                                  type='text' name='jlName'
                                                                  value='${coachsubentry.jlName}'/>
                                            <input type="hidden" name="cfcoachid" class="cfcoachid"
                                                   value='${coachsubentry.cfjiaolianid}'>
                                        </td>
                                        <td align='center'><input class='cfcoachno' style='width: 90px;'
                                                                  type='text' name='cfcoachno' readonly="readonly"
                                                                  value='${coachsubentry.cfjiaolianno}'/>
                                        </td>
                                        <td name='notcheck' align='center'>
                                            <c:if test="${coachsubentry.cfdqsub eq 1}">
                                                <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                                       type='text' name='cfdqsub1' value='科目一'/>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfdqsub eq 2}">
                                                <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                                       type='text' name='cfdqsub1' value='科目二'/>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfdqsub eq 3}">
                                                <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                                       type='text' name='cfdqsub1' value='科目三'/>
                                            </c:if>

                                            <input class='cfdqsub' style='width: 90px;' readonly="readonly"
                                                   type='hidden' name='cfdqsub' value='${coachsubentry.cfdqsub}'/>

                                        </td>
                                        <td align='center'><input class='cfdqcartype' style='width: 90px;'
                                                                  readonly="readonly"
                                                                  type='text' name='cfdqcartype'
                                                                  value='${coachsubentry.cfdqcartype}'/>
                                        </td>
                                        <td name='notcheck' align='center'>
                                            <c:if test="${coachsubentry.cfxzsub eq 1}">
                                                <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                                    <option selected="selected" value="1">科目一</option>
                                                    <option value="2">科目二</option>
                                                    <option value="3">科目三</option>
                                                </select>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfxzsub eq 2}">
                                                <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                                    <option value="1">科目一</option>
                                                    <option selected="selected" value="2">科目二</option>
                                                    <option value="3">科目三</option>
                                                </select>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfxzsub eq 3}">
                                                <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                                    <option value="1">科目一</option>
                                                    <option value="2">科目二</option>
                                                    <option selected="selected" value="3">科目三</option>
                                                </select>
                                            </c:if>

                                        </td>
                                        <td name='notcheck' align='center'>
                                            <select style='width: 90px;' name="cfxzcartype" class="cfxzcartype">

                                                <c:if test="${coachsubentry.cfxzcartype == 'A1'}">
                                                    <option selected="selected" value="A1" style="font-size: 16px">A1
                                                    </option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'A2'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option selected="selected" value="A2" style="font-size: 16px">A2
                                                    </option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'A3'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option selected="selected" value="A3" style="font-size: 16px">A3
                                                    </option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'B1'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option selected="selected" value="B1" style="font-size: 16px">B1
                                                    </option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'B2'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option selected="selected" value="B2" style="font-size: 16px">B2
                                                    </option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C1'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option selected="selected" value="C1" style="font-size: 16px">C1
                                                    </option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C2'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option selected="selected" value="C2" style="font-size: 16px">C2
                                                    </option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C3'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option selected="selected" value="C3" style="font-size: 16px">C3
                                                    </option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C4'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option selected="selected" value="C4" style="font-size: 16px">C4
                                                    </option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'D'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option selected="selected" value="D" style="font-size: 16px">D
                                                    </option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'E'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option selected="selected" value="E" style="font-size: 16px">E
                                                    </option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'F'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option selected="selected" value="F" style="font-size: 16px">F
                                                    </option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'M'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option selected="selected" value="M" style="font-size: 16px">M
                                                    </option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'N'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option selected="selected" value="N" style="font-size: 16px">N
                                                    </option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'P'}">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option selected="selected" value="P" style="font-size: 16px">P
                                                    </option>
                                                    <option value=" " style="font-size: 16px"></option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype =='' || coachsubentry.cfxzcartype ==null }">
                                                    <option value="A1" style="font-size: 16px">A1</option>
                                                    <option value="A2" style="font-size: 16px">A2</option>
                                                    <option value="A3" style="font-size: 16px">A3</option>
                                                    <option value="B1" style="font-size: 16px">B1</option>
                                                    <option value="B2" style="font-size: 16px">B2</option>
                                                    <option value="C1" style="font-size: 16px">C1</option>
                                                    <option value="C2" style="font-size: 16px">C2</option>
                                                    <option value="C3" style="font-size: 16px">C3</option>
                                                    <option value="C4" style="font-size: 16px">C4</option>
                                                    <option value="D" style="font-size: 16px">D</option>
                                                    <option value="E" style="font-size: 16px">E</option>
                                                    <option value="F" style="font-size: 16px">F</option>
                                                    <option value="M" style="font-size: 16px">M</option>
                                                    <option value="N" style="font-size: 16px">N</option>
                                                    <option value="P" style="font-size: 16px">P</option>
                                                    <option selected="selected" value=" "
                                                            style="font-size: 16px"></option>
                                                </c:if>
                                            </select>
                                        </td>
                                        <td name='notcheck' align='center'><input class='cfdesc' style='width: 90px;'
                                                                                  type='text' name='cfdesc'
                                                                                  value='${coachsubentry.cfdesc}'/>
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </div>

                        <div style="line-height:31px; margin-top: 80px; height: 31px; ">
                            <div class="botton">
                                <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                                <input id="shename" readonly="readonly" type="text" name="ffivouchered"
                                       value="${coachsub.checkName}">
                            </div>
                            <div class="botton">
                                <span class="gn_name">创建人&nbsp;:&nbsp;</span>
                                <input id="createname" readonly="readonly" type="text" name="createName"
                                       value="${coachsub.createName}">
                            </div>
                            <div class="botton">
                                <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                                <input id="updatetime" readonly="readonly" type="text" name="fcreatetime"
                                       value="${coachsub.fcreatetime}">
                            </div>
                        </div>

                        <div class="div_tj">
                            <shiro:hasPermission name="/go_update_Coachsub">
                                <div>
                                    <input type="button" class="input_submit bc" value="" onclick="audit(2)">
                                </div>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="/submitCoachsub">
                                <div>
                                    <input type="button" class="input_submit tj" value="" onclick="submitTj()"/>
                                </div>
                            </shiro:hasPermission>
                            <div>
                                <input type="button" class="input_submit cklc" value=""
                                       onclick="lookActivitiImg('publicProcess',$('#fnumber').val())">
                            </div>
                            <div>
                                <input type="button" class="input_back fh" value=""
                                       onclick="back()"/>
                            </div>
                        </div>
                    </form>
                </div>
            </c:if>
            <c:if test="${coachsub.cfbillstate == 4}">
                <div class="div_form">
                    <form id="update_shar" action="<%=path%>/DrivingSys/update_CoachSub" class="form" method="get">
                        <div class="div_input_hang">
                            <input type="hidden" name="fid" id="fid" value="${coachsub.fid}"/>
                            <div class="input_hang">
                                <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                                <input type="text" name="name" value="${department}" readonly="readonly"
                                       style="color: gray;"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                                <input type="text" name="fnumber" id="fnumber" value="${coachsub.fnumber}"
                                       style="color: gray;"
                                       readonly="readonly"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                                <input type="text" name="fbizdate" id="fbizdate_bind" value="${coachsub.fbizdate}"
                                       readonly="readonly"/>
                                <img
                                        src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                            </div>
                        </div>
                        <div class="div_input_hang">
                            <div class="input_hang">
                                <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                                <input name="fdescription" value="${coachsub.fdescription}" readonly="readonly"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                                <select name="cfbillstate">
                                    <option id="fdescriptionL2" style="color: gray;" value="4">提交</option>
                                </select>
                            </div>
                        </div>
                        <div style="width: 100%; margin-left: 90px; float: left">教练</div>
                        <div class="div_zilei" style="margin-left: 90px; float: left">

                        </div>
                        <div style="overflow:auto;min-height: 390px;max-height: 390px;width: 88%;margin-left: 90px;">
                            <table id="tablejl" width="50%"
                                   style=" min-height:50px;border-spacing:0;white-space:nowrap;">
                                <tr class="tr">
                                    <td width="20px" align="center" style="padding-left: 5px"><%--<input type="checkbox"
                                                                                                     name="check"
                                                                                                     class="check"
                                                                                                     style="width: 15px;">--%>
                                    </td>
                                    <td width="30px">序号</td>
                                    <td align="center">教练</td>
                                    <td align="center">教练编码</td>
                                    <td align="center">原教学科目</td>
                                    <td align="center">原来车型</td>
                                    <td align="center">现教学科目</td>
                                    <td align="center">现在车型</td>
                                    <td align="center">备注</td>
                                </tr>
                                <c:forEach items="${coachsub.coachsubentryList}" var="coachsubentry" varStatus="s">
                                    <tr>
                                        <td width='20px' align='center'>
                                            <input class='check2' type="checkbox" name="check2" style="width:15px">

                                        </td>
                                        <td><input type="text" class="fseq" name="fseq" value="${s.index+1}"
                                                   readonly="readonly"></td>
                                        <td align='center'><input readonly="readonly" class='jlName is_click'
                                                                  style='width: 90px;'
                                                                  type='text' name='jlName'
                                                                  value='${coachsubentry.jlName}'/>
                                            <input type="hidden" name="cfcoachid" class="cfcoachid"
                                                   value='${coachsubentry.cfjiaolianid}'>
                                        </td>
                                        <td align='center'><input class='cfcoachno' style='width: 90px;'
                                                                  type='text' name='cfcoachno' readonly="readonly"
                                                                  value='${coachsubentry.cfjiaolianno}'/>
                                        </td>
                                        <td name='notcheck' align='center'>
                                            <c:if test="${coachsubentry.cfdqsub eq 1}">
                                                <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                                       type='text' name='cfdqsub1' value='科目一'/>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfdqsub eq 2}">
                                                <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                                       type='text' name='cfdqsub1' value='科目二'/>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfdqsub eq 3}">
                                                <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                                       type='text' name='cfdqsub1' value='科目三'/>
                                            </c:if>

                                            <input class='cfdqsub' style='width: 90px;' readonly="readonly"
                                                   type='hidden' name='cfdqsub' value='${coachsubentry.cfdqsub}'/>

                                        </td>
                                        <td align='center'><input class='cfdqcartype' style='width: 90px;'
                                                                  readonly="readonly"
                                                                  type='text' name='cfdqcartype'
                                                                  value='${coachsubentry.cfdqcartype}'/>
                                        </td>
                                        <td name='notcheck' align='center'>
                                            <c:if test="${coachsubentry.cfxzsub eq 1}">
                                                <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                                    <option selected="selected" value="1">科目一</option>
                                                </select>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfxzsub eq 2}">
                                                <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                                    <option selected="selected" value="2">科目二</option>
                                                </select>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfxzsub eq 3}">
                                                <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                                    <option value="3">科目三</option>
                                                </select>
                                            </c:if>

                                        </td>
                                        <td name='notcheck' align='center'>
                                            <select style='width: 90px;' name="cfxzcartype" class="cfxzcartype">

                                                <c:if test="${coachsubentry.cfxzcartype == 'A1'}">
                                                    <option selected="selected" value="A1" style="font-size: 16px">A1
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'A2'}">
                                                    <option selected="selected" value="A2" style="font-size: 16px">A2
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'A3'}">
                                                    <option selected="selected" value="A3" style="font-size: 16px">A3
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'B1'}">
                                                    <option selected="selected" value="B1" style="font-size: 16px">B1
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'B2'}">
                                                    <option selected="selected" value="B2" style="font-size: 16px">B2
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C1'}">
                                                    <option selected="selected" value="C1" style="font-size: 16px">C1
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C2'}">
                                                    <option selected="selected" value="C2" style="font-size: 16px">C2
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C3'}">
                                                    <option selected="selected" value="C3" style="font-size: 16px">C3
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C4'}">
                                                    <option selected="selected" value="C4" style="font-size: 16px">C4
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'D'}">
                                                    <option selected="selected" value="D" style="font-size: 16px">D
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'E'}">
                                                    <option selected="selected" value="E" style="font-size: 16px">E
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'F'}">
                                                    <option selected="selected" value="F" style="font-size: 16px">F
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'M'}">
                                                    <option selected="selected" value="M" style="font-size: 16px">M
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'N'}">
                                                    <option selected="selected" value="N" style="font-size: 16px">N
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'P'}">
                                                    <option selected="selected" value="P" style="font-size: 16px">P
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype =='' || coachsubentry.cfxzcartype ==null }">
                                                    <option selected="selected" value=" "
                                                            style="font-size: 16px"></option>
                                                </c:if>
                                            </select>
                                        </td>
                                        <td name='notcheck' align='center'><input class='cfdesc' style='width: 90px;'
                                                                                  readonly="readonly"
                                                                                  type='text' name='cfdesc'
                                                                                  value='${coachsubentry.cfdesc}'/>
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </div>

                        <div style="line-height:31px; margin-top: 80px; height: 31px; ">
                            <div class="botton">
                                <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                                <input id="shename" readonly="readonly" type="text" name="ffivouchered"
                                       value="${coachsub.checkName}">
                            </div>
                            <div class="botton">
                                <span class="gn_name">创建人&nbsp;:&nbsp;</span>
                                <input id="createname" readonly="readonly" type="text" name="createName"
                                       value="${coachsub.createName}">
                            </div>
                            <div class="botton">
                                <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                                <input id="updatetime" readonly="readonly" type="text" name="fcreatetime"
                                       value="${coachsub.fcreatetime}">
                            </div>
                        </div>

                        <div class="div_tj">
                            <c:if test="${AuditState == 'true'}">
                                <shiro:hasPermission name="/auditCoachsub">
                                    <div>
                                        <input type="button" class="input_submit sh" value="" onclick="examine(5)"/>
                                    </div>
                                </shiro:hasPermission>
                            </c:if>
                            <shiro:hasPermission name="/againstAuditCoachsub">
                                <div>
                                    <input type="button" class="input_submit fsh" value="" onclick="examine(3)"/>
                                </div>
                            </shiro:hasPermission>
                            <div>
                                <input type="button" class="input_submit cklc" value=""
                                       onclick="lookActivitiImg('publicProcess',$('#fnumber').val())">
                            </div>
                            <div>
                                <input type="button" class="input_back fh" value=""
                                       onclick="back()"/>
                            </div>
                        </div>
                    </form>
                </div>

            </c:if>
            <c:if test="${coachsub.cfbillstate == 5}">
                <div class="div_form">
                    <form id="update_shar" action="<%=path%>/DrivingSys/update_CoachSub" class="form" method="get">
                        <div class="div_input_hang">
                            <input type="hidden" name="fid" id="fid" value="${coachsub.fid}"/>
                            <div class="input_hang">
                                <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                                <input type="text" name="name" value="${department}" readonly="readonly"
                                       style="color: gray;"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                                <input type="text" name="fnumber" id="fnumber" value="${coachsub.fnumber}"
                                       style="color: gray;"
                                       readonly="readonly"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                                <input type="text" name="fbizdate" id="fbizdate_bind" value="${coachsub.fbizdate}"
                                       readonly="readonly"/>
                                <img
                                        src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                            </div>
                        </div>
                        <div class="div_input_hang">
                            <div class="input_hang">
                                <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                                <input name="fdescription" value="${coachsub.fdescription}" readonly="readonly"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                                <select name="cfbillstate">
                                    <option id="fdescriptionL2" style="color: gray;" value="5">审核</option>
                                </select>
                            </div>
                        </div>
                        <div style="width: 100%; margin-left: 90px; float: left">教练</div>
                        <div class="div_zilei" style="margin-left: 90px; float: left">

                        </div>
                        <div style="overflow:auto;min-height: 390px;max-height: 390px;width: 88%;margin-left: 90px;">
                            <table id="tablejl" width="50%"
                                   style=" min-height:50px;border-spacing:0;white-space:nowrap;">
                                <tr class="tr">
                                    <td width="20px" align="center" style="padding-left: 5px"><%--<input type="checkbox"
                                                                                                     name="check"
                                                                                                     class="check"
                                                                                                     style="width: 15px;">--%>
                                    </td>
                                    <td width="30px">序号</td>
                                    <td align="center">教练</td>
                                    <td align="center">教练编码</td>
                                    <td align="center">原教学科目</td>
                                    <td align="center">原来车型</td>
                                    <td align="center">现教学科目</td>
                                    <td align="center">现在车型</td>
                                    <td align="center">备注</td>
                                </tr>
                                <c:forEach items="${coachsub.coachsubentryList}" var="coachsubentry" varStatus="s">
                                    <tr>
                                        <td width='20px' align='center'>
                                            <input class='check2' type="checkbox" name="check2" style="width:15px">

                                        </td>
                                        <td><input type="text" class="fseq" name="fseq" value="${s.index+1}"
                                                   readonly="readonly"></td>
                                        <td align='center'><input readonly="readonly" class='jlName is_click'
                                                                  style='width: 90px;'
                                                                  type='text' name='jlName'
                                                                  value='${coachsubentry.jlName}'/>
                                            <input type="hidden" name="cfcoachid" class="cfcoachid"
                                                   value='${coachsubentry.cfjiaolianid}'>
                                        </td>
                                        <td align='center'><input class='cfcoachno' style='width: 90px;'
                                                                  type='text' name='cfcoachno' readonly="readonly"
                                                                  value='${coachsubentry.cfjiaolianno}'/>
                                        </td>
                                        <td name='notcheck' align='center'>
                                            <c:if test="${coachsubentry.cfdqsub eq 1}">
                                                <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                                       type='text' name='cfdqsub1' value='科目一'/>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfdqsub eq 2}">
                                                <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                                       type='text' name='cfdqsub1' value='科目二'/>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfdqsub eq 3}">
                                                <input class='cfdqsub1' style='width: 90px;' readonly="readonly"
                                                       type='text' name='cfdqsub1' value='科目三'/>
                                            </c:if>

                                            <input class='cfdqsub' style='width: 90px;' readonly="readonly"
                                                   type='hidden' name='cfdqsub' value='${coachsubentry.cfdqsub}'/>

                                        </td>
                                        <td align='center'><input class='cfdqcartype' style='width: 90px;'
                                                                  readonly="readonly"
                                                                  type='text' name='cfdqcartype'
                                                                  value='${coachsubentry.cfdqcartype}'/>
                                        </td>
                                        <td name='notcheck' align='center'>
                                            <c:if test="${coachsubentry.cfxzsub eq 1}">
                                                <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                                    <option selected="selected" value="1">科目一</option>
                                                </select>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfxzsub eq 2}">
                                                <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                                    <option selected="selected" value="2">科目二</option>
                                                </select>
                                            </c:if>
                                            <c:if test="${coachsubentry.cfxzsub eq 3}">
                                                <select style='width: 90px;' name="cfxzsub" class="cfxzsub">
                                                    <option value="3">科目三</option>
                                                </select>
                                            </c:if>

                                        </td>
                                        <td name='notcheck' align='center'>
                                            <select style='width: 90px;' name="cfxzcartype" class="cfxzcartype">

                                                <c:if test="${coachsubentry.cfxzcartype == 'A1'}">
                                                    <option selected="selected" value="A1" style="font-size: 16px">A1
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'A2'}">
                                                    <option selected="selected" value="A2" style="font-size: 16px">A2
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'A3'}">
                                                    <option selected="selected" value="A3" style="font-size: 16px">A3
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'B1'}">
                                                    <option selected="selected" value="B1" style="font-size: 16px">B1
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'B2'}">
                                                    <option selected="selected" value="B2" style="font-size: 16px">B2
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C1'}">
                                                    <option selected="selected" value="C1" style="font-size: 16px">C1
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C2'}">
                                                    <option selected="selected" value="C2" style="font-size: 16px">C2
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C3'}">
                                                    <option selected="selected" value="C3" style="font-size: 16px">C3
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'C4'}">
                                                    <option selected="selected" value="C4" style="font-size: 16px">C4
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'D'}">
                                                    <option selected="selected" value="D" style="font-size: 16px">D
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'E'}">
                                                    <option selected="selected" value="E" style="font-size: 16px">E
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'F'}">
                                                    <option selected="selected" value="F" style="font-size: 16px">F
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'M'}">
                                                    <option selected="selected" value="M" style="font-size: 16px">M
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'N'}">
                                                    <option selected="selected" value="N" style="font-size: 16px">N
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype == 'P'}">
                                                    <option selected="selected" value="P" style="font-size: 16px">P
                                                    </option>
                                                </c:if>
                                                <c:if test="${coachsubentry.cfxzcartype =='' || coachsubentry.cfxzcartype ==null }">
                                                    <option selected="selected" value=" "
                                                            style="font-size: 16px"></option>
                                                </c:if>
                                            </select>
                                        </td>
                                        <td name='notcheck' align='center'><input class='cfdesc' style='width: 90px;'
                                                                                  readonly="readonly"
                                                                                  type='text' name='cfdesc'
                                                                                  value='${coachsubentry.cfdesc}'/>
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </div>

                        <div style="line-height:31px; margin-top: 80px; height: 31px; ">
                            <div class="botton">
                                <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                                <input id="shename" readonly="readonly" type="text" name="ffivouchered"
                                       value="${coachsub.checkName}">
                            </div>
                            <div class="botton">
                                <span class="gn_name">创建人&nbsp;:&nbsp;</span>
                                <input id="createname" readonly="readonly" type="text" name="createName"
                                       value="${coachsub.createName}">
                            </div>
                            <div class="botton">
                                <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                                <input id="updatetime" readonly="readonly" type="text" name="fcreatetime"
                                       value="${coachsub.fcreatetime}">
                            </div>
                        </div>

                        <div class="div_tj">
                            <shiro:hasPermission name="/againstAuditCoachsub">
                                <div>
                                    <input type="button" class="input_submit fsh" value="" onclick="examine(3)"/>
                                </div>
                            </shiro:hasPermission>
                            <div>
                                <input type="button" class="input_submit cklc" value=""
                                       onclick="lookActivitiImg('publicProcess',$('#fnumber').val())">
                            </div>
                            <div>
                                <input type="button" class="input_back fh" value=""
                                       onclick="back()"/>
                            </div>
                        </div>
                    </form>
                </div>

            </c:if>
        </c:if>


    </div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<script type="text/javascript" src="<%=path%>/HoganJS/handlebars-v4.0.11.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp" %>
<script type="text/javascript">

    //改变复选框的值
    function chcek() {
        $('#update_shar').submit()
    }

    //改变审核状态
    function audit(state) {
        //改变单据状态
        $("#fdescriptionL2").val(state);
        //写入审核人标记
        $("#shename").val(state);
        if ($('#update_shar').find("tr").length == 1) {
            alert('请至少选择一条数据！')
            return false;
        }
        $('#update_shar').submit()
    }

    $('.addTable').click(function () {
        fseq = CalculateMaxNum('tablejl')
        var htmlperson = "<tr> " +
            "<td width='20px' align='center'> " +
            "<input class='check2' type='checkbox' name='check2' style='width:15px'> " +
            "</td> " +
            " <td><input type='text' class='fseq' name='fseq' value='" + fseq + "' readonly='readonly'></td>" +
            "<td align='center'>" +
            "<input onclick='clickJlname($(this))' class='jlName is_click' style='width: 90px;'type='text' name='jlName'value=''/>" +
            " <input type='hidden' name='cfcoachid' class='cfcoachid'value=''> " +
            "</td> " +
            "<td align='center'>" +
            "<input class='cfcoachno' style='width: 90px;' readonly='readonly'  type='text' name='cfcoachno'value=''/> " +
            "</td>" +
            " <td name='notcheck' align='center'>" +
            " <input class='cfdqsub1' style='width: 90px;'type='text' readonly='readonly'  name='cfdqsub1' value=''/>" +
            " <input class='cfdqsub' style='width: 90px;'type='hidden' name='cfdqsub' value=''/> " +
            "</td>" +
            " <td align='center'>" +
            "<input class='cfdqcartype' readonly='readonly'  style='width: 90px;'type='text' name='cfdqcartype'value=''/> " +
            "</td>" +
            " <td name='notcheck' align='center'> " +
            "<select style='width: 90px;' name='cfxzsub' class='cfxzsub'> " +
            "<option selected='selected' value='1'>科目一</option> " +
            "<option value='2'>科目二</option> " +
            "<option value='3'>科目三</option> " +
            "</select> " +
            "</td> " +
            "<td name='notcheck' align='center'> " +
            "<select style='width: 90px;' name='cfxzcartype' class='cfxzcartype'> " +
            "<option selected='selected' value='A1' style='font-size: 16px'>A1 </option> " +
            "<option value='A2' style='font-size: 16px'>A2</option>" +
            " <option value='A3' style='font-size: 16px'>A3</option> " +
            "<option value='B1' style='font-size: 16px'>B1</option> " +
            "<option value='B2' style='font-size: 16px'>B2</option> " +
            "<option value='C1' style='font-size: 16px'>C1</option> " +
            "<option value='C2' style='font-size: 16px'>C2</option> " +
            "<option value='C3' style='font-size: 16px'>C3</option> " +
            "<option value='C4' style='font-size: 16px'>C4</option> " +
            "<option value='D' style='font-size: 16px'>D</option> " +
            "<option value='E' style='font-size: 16px'>E</option> " +
            "<option value='F' style='font-size: 16px'>F</option>" +
            " <option value='M' style='font-size: 16px'>M</option> " +
            "<option value='N' style='font-size: 16px'>N</option> " +
            "<option value='P' style='font-size: 16px'>P</option> " +
            "<option value=' ' style='font-size: 16px'></option> " +
            "</select> " +
            "</td>" +
            " <td name='notcheck' align='center'>" +
            "<input class='cfdesc' style='width: 90px;'type='text' name='cfdesc'value=''/> " +
            "</td> " +
            "</tr>";
        $("#tablejl").append(htmlperson)
    })

    //弹出模式框教练信息
    function clickJlname(e) {
        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data1').css('visibility', 'visible')
        $('.data1-checkbox:checkbox').removeAttr('checked');
        $('.page').show();
        _this = e.parent().parent();
    }

    //弹出车辆信息
    function clickcar(e) {
        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data5').css('visibility', 'visible')
        $('.data5-checkbox:checkbox').removeAttr('checked');
        _this = e.parent().parent();
    }

    function submitTj() {

        $.messager.confirm('提示', '是否提交,提交后不会改变修改后的值', function (r) {

            if (r) {
                $.ajax({
                    url: '<%=path%>/DrivingSys/queryCoachSubSubmit',
                    type: "post",
                    data: {
                        'fid': $('#fid').val(),
                        'fnumber': $('#fnumber').val()
                    },
                    dataType: "json",
                    success: function (res) {
                        /*showAlert(res.msg, 'queryCoachSub/look.action?state=first');*/
                        showAlert(res.msg, 'go_update_Coachsub?fid=' + $('#fid').val());
                    },
                    error: function () {
                        alert('错误');
                    }
                })
            }
        });

    }

    $('#auditsubmit').click(function () {
        $('.auditcheck').each(function () {
            if ($(this).is(':checked')) {
                $.ajax({
                    url: '<%=path%>/DrivingSys/queryCoachSubExamine',
                    type: "post",
                    data: {
                        'fid': $('#fid').val(),
                        'state': _state,
                        'fnumber': $('#fnumber').val(),
                        'agreed': $(this).val(),
                        'auditcomment': $('#auditcomment').val()
                    },
                    dataType: "json",
                    success: function (res) {
                        /*showAlert(res.msg, 'queryCoachSub/look.action?state=first');*/
                        showAlert(res.msg, 'go_update_Coachsub?fid=' + $('#fid').val());
                    },
                    error: function () {
                        alert('错误');
                    }
                })
            } else {

            }
        })
    })
    //反审核按钮
    $('#againstAuditsubmit').click(function () {
        $.ajax({
            url: '<%=path%>/DrivingSys/queryCoachSubExamine',
            type: "post",
            data: {
                'fid': $('#fid').val(),
                'state': _state,
                'fnumber': $('#fnumber').val(),
                'auditcomment': $('#againstAuditcomment').val()
            },
            dataType: "json",
            success: function (res) {
                showAlert(res.msg, 'queryCoachSub/look.action?state=first');
            },
            error: function () {
                alert('错误');
            }
        })
    })

    function examine(state) {
        _state = state;
        if (state == 5) {
            $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data9').css('visibility', 'visible')
        }
        else if (state == 3) {
            $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data10').css('visibility', 'visible')
        }
    }

    /* 关闭弹出框    */
    $('.btn').click(function () {
        $('#modal-overlay').css('visibility', 'hidden')
        $('.modal-data1').css('visibility', 'hidden')
        $('.data1-checkbox:checkbox').removeAttr('checked');
        $('.modal-data5').css('visibility', 'hidden')
        $('.data5-checkbox:checkbox').removeAttr('checked');
        $('.modal-data9').css('visibility', 'hidden')
        $('.modal-data10').css('visibility', 'hidden')
        $('.page').hide();
    })

    //设置全选功选
    $('.check').click(function () {
        if ($(this).attr("checked")) {
            $(".check2:checkbox").not(':disabled').prop("checked", true)
        } else {
            $('.check2:checkbox').removeAttr('checked')
        }
    })
    //由于和input:checkbox冲突，在选择一次
    $("#tablejl tr td .check2:checkbox").live('click', function () {
        if ($(this).is('.check2:checked')) {
            $(this).removeAttr("checked");
        } else {
            $(this).attr("checked", ".check2:checked")
        }
    })
    //单击选中
    $("#tablejl tr td").live('click', function () {
        if ($(this).parent().find(".check2:checkbox").is(':checked')) {
            $(this).parent().find(".check2:checkbox").removeAttr("checked");
        } else {
            $(this).parent().find(".check2:checkbox").attr("checked", ":checked")
        }
    })

    //选中的删除
    $(".deleteTable").click(function () {
        var tr_len = $("#tablejl tr").length;
        var s = '';
        $('input:checkbox[name=check2]').each(function (i) {

            if ($(this).is('.check2:checked')) {

                $(this).parent().parent().remove();
                s = '1';
                reorder()
            }
        })

        //判断是否选中
        if (s == null || s == '') {
            alert("请选择一条数据删除");
            return false;
        }
    })

    //把选中的教练信息名称填充到输入框中
    $('#subtn1').click(function () {
        var spCodesTemp = "";
        $('input:checkbox[name=personfid]:checked').each(function (i) {
            spCodesTemp = $(this).val();
        });
        if (spCodesTemp == "") {
            alert('请选择教练信息！');
            return false;
        }
        $.ajax({
            url: '<%=path%>/DrivingSys/selectPersonByFidAsPage',
            type: "post",
            data: {'id': spCodesTemp},
            dataType: "json",
            success: function (res) {

                _this.children().children('input[class=cfcoachid]').prev().val(res[0].jlname);
                _this.children().children('input[class=cfcoachid]').val(res[0].fid);
                _this.children().children('input[class=cfcoachno]').val(res[0].jlbumber);
                _this.children().children('input[class=cfdqsub]').val(res[0].cfkemu);
                if (res[0].cfkemu == 1) {
                    _this.children().children('input[class=cfdqsub1]').val('科目一');
                }
                if (res[0].cfkemu == 2) {
                    _this.children().children('input[class=cfdqsub1]').val('科目二');
                }
                if (res[0].cfkemu == 3) {
                    _this.children().children('input[class=cfdqsub1]').val('科目三');
                }

                _this.children().children('input[class=cfdqcartype]').val(res[0].cfcartype);

                $('#modal-overlay').css('visibility', 'hidden')
                $('.modal-data1').css('visibility', 'hidden')
            },
            error: function () {
                alert('Error');
            }
        });

    });


    function back() {
        parent.closeSelectCard()
        //location.href = '<%=path%>/DrivingSys/queryCoachSub/look.action?state=first'
    }


</script>
</html>